#ifndef __CPPTUTOROVERLOADINGUNARYOPERATOR_H__
#define __CPPTUTOROVERLOADINGUNARYOPERATOR_H__

class CcppTutorOverloadingUnaryOperator
{
    private:
        int m_nValueA, m_nValueB;
        bool m_bValueA, m_bValueB;
        int *m_npValue;
    public:
        CcppTutorOverloadingUnaryOperator ();
        CcppTutorOverloadingUnaryOperator (int, int);
       ~CcppTutorOverloadingUnaryOperator ();
       
        void m_DisplayValue ();
        void m_DisplayValueBool ();
        
       /*
        * Overloading using non memeber functions / global
        */
#ifdef UNARY_OVERLOADING_OPERATOR_USING_FRIEND
        //Unary Plus
        friend const CcppTutorOverloadingUnaryOperator& operator + (const CcppTutorOverloadingUnaryOperator& uop);

        //Unary Minus
        friend const CcppTutorOverloadingUnaryOperator& operator - (const CcppTutorOverloadingUnaryOperator& uop);

        //Prefix Increment
        friend const CcppTutorOverloadingUnaryOperator& operator ++ (CcppTutorOverloadingUnaryOperator& uop);

        //Postfix Increment
        friend const CcppTutorOverloadingUnaryOperator& operator ++ (CcppTutorOverloadingUnaryOperator& uop, int);

        //Prefix Decrement
        friend const CcppTutorOverloadingUnaryOperator& operator -- (CcppTutorOverloadingUnaryOperator& uop);

        //Postfix Decrement
        friend const CcppTutorOverloadingUnaryOperator& operator -- (CcppTutorOverloadingUnaryOperator& uop, int);

        //One's Compliment
        friend const CcppTutorOverloadingUnaryOperator& operator ~ (CcppTutorOverloadingUnaryOperator& uop);

        //Logical NOT
        friend const CcppTutorOverloadingUnaryOperator& operator ! (CcppTutorOverloadingUnaryOperator& uop);

        //Addressof operator &
        //friend const CcppTutorOverloadingUnaryOperator& operator ! (CcppTutorOverloadingUnaryOperator& uop);

        //Pointer dereference
        //friend const CcppTutorOverloadingUnaryOperator& operator * (CcppTutorOverloadingUnaryOperator& uop);
#else
       /*
        * Overloading using Member function
        */
        //Unary Plus
        CcppTutorOverloadingUnaryOperator& operator + ();

        //fix me: error on linux compilation
        #ifdef WIN32
        //Unary Minus
        CcppTutorOverloadingUnaryOperator& operator - ();
        #endif
        
        //Prefix Increment
        CcppTutorOverloadingUnaryOperator& operator ++ ();

        //Postfix Increment
        CcppTutorOverloadingUnaryOperator operator ++ (int);

        //Prefix Decrement
        CcppTutorOverloadingUnaryOperator operator -- ();

        //Postfix Decrement
        CcppTutorOverloadingUnaryOperator operator -- (int);

        //One's Compliment
        CcppTutorOverloadingUnaryOperator operator ~ ();

        //Logical NOT
        CcppTutorOverloadingUnaryOperator operator ! ();

        //Addressof operator &
        //friend const CcppTutorOverloadingUnaryOperator& operator ! (CcppTutorOverloadingUnaryOperator& uop);

        //Pointer dereference
        //friend const CcppTutorOverloadingUnaryOperator& operator * (CcppTutorOverloadingUnaryOperator& uop);

#endif //UNARY_OVERLOADING_OPERATOR_USING_FRIEND
};


#endif //__CPPTUTOROVERLOADINGUNARYOPERATOR_H__

